<template>
    <page-body>
        <view class="page">
            <view class="flex align-stretch benben-position-layout flex allEvaluae_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex align-center justify-between flex-sub allEvaluae_fd0_0'>
                    <view class='flex align-center allEvaluae_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
                        <text class='fu-iconfont2  allEvaluae_fd0_0_c0_c0'>&#xE794;</text>
                    </view>
                    <text class='allEvaluae_fd0_0_c1'>全部评价</text>
                    <view class='flex align-center allEvaluae_fd0_0_c0'>
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
            <!---flex布局flex布局开始-->
            <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout allEvaluae_flex_1">
                <benben-select-diy ref="showSelectPopup1715675818752" class-name='flex flex-wrap align-center flex allEvaluae_fd1_0' :items.sync="evaluateType"
				 v-model="evaluate_id" default-type="value" default-label="name" :allow-cancel='false' type="radio" :disabled='false' @change="qiehuan">
                    <template v-for='(item,key0) in evaluateType'>
                        <view v-if="item.isSelected" class='flex align-center flex allEvaluae_fd1_0_c0' :key="key0" @tap="$refs.showSelectPopup1715675818752.tapHandle(key0)">
                            <text class='allEvaluae_fd1_0_c0_c0'>
								{{item.name}}
								<text v-if="item.value == 0 && list.corner_mark && list.corner_mark.total_num > 0">{{list.corner_mark.total_num}}</text>
								<text v-if="item.value == 1 && list.corner_mark && list.corner_mark.good_num > 0">{{list.corner_mark.good_num}}</text>
								<text v-if="item.value == 2 && list.corner_mark && list.corner_mark.picture_num > 0">{{list.corner_mark.picture_num}}</text>
								<text v-if="item.value == 3 && list.corner_mark && list.corner_mark.bad_num > 0">{{list.corner_mark.bad_num}}</text>
								<text v-if="item.value == 4 && list.corner_mark && list.corner_mark.medium_num > 0">{{list.corner_mark.medium_num }}</text>
							</text>
                        </view>
                        <view v-else class='flex align-center flex allEvaluae_fd1_0_c1' :key="key0" @tap="$refs.showSelectPopup1715675818752.tapHandle(key0)">
                            <text class='allEvaluae_fd1_0_c1_c0'>
								{{item.name}}
								<text v-if="item.value == 0 && list.corner_mark && list.corner_mark.total_num > 0">{{list.corner_mark.total_num}}</text>
								<text v-if="item.value == 1 && list.corner_mark && list.corner_mark.good_num > 0">{{list.corner_mark.good_num}}</text>
								<text v-if="item.value == 2 && list.corner_mark && list.corner_mark.picture_num > 0">{{list.corner_mark.picture_num}}</text>
								<text v-if="item.value == 3 && list.corner_mark && list.corner_mark.bad_num > 0">{{list.corner_mark.bad_num}}</text>
								<text v-if="item.value == 4 && list.corner_mark && list.corner_mark.medium_num > 0">{{list.corner_mark.medium_num }}</text>
							</text>
                        </view>
                    </template>
                </benben-select-diy>
				<fu-loading v-if="isShow"></fu-loading>
				<view class="" v-if="!isShow">
				<template v-for='(item,key0) in list2'>
                <view class='flex flex-direction flex-wrap align-stretch allEvaluae_fd1_1'>
                    <view class='flex flex-wrap align-center allEvaluae_fd1_1_c0'>
                        <image class='allEvaluae_fd1_1_c0_c0' mode="aspectFill" :src='item.avatar'></image>
                        <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
                            <view class='flex flex-wrap align-center allEvaluae_fd1_1_c0_c1_c0'>
                                <text class='flex-sub allEvaluae_fd1_1_c0_c1_c0_c0'>{{item.nickname}}</text>
                                <text class='allEvaluae_fd1_1_c0_c1_c0_c1'>{{item.create_time}}</text>
                            </view>
                            <view class='flex flex-wrap align-center'>
                                <template v-for="starNum in [1,2,3,4,5]">
                                    <image v-if="item.store_score >= starNum" :key="starNum" class='allEvaluae_star1fd1_1_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"133.png"'></image>
                                    <image v-else :key="starNum" class='allEvaluae_star1fd1_1_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"134.png"'></image>
                                </template>
                            </view>
                        </view>
                    </view>
                    <text class='allEvaluae_fd1_1_c1'>{{item.content}}</text>
                    <view class='flex flex-wrap align-center allEvaluae_fd1_1_c2'>
						<template v-for='(itm,ky0) in item.thumb'>
							<view class='flex flex-wrap align-center allEvaluae_fd1_1_c2_c0' @tap.stop="multiImagePreview(itm,item.thumb,'')">
								<image class='allEvaluae_fd1_1_c2_c0_c0' mode="aspectFill" :src='itm'></image>
							</view>
						</template>
                    </view>
                    <view class='flex flex-wrap align-center allEvaluae_fd1_1_c3' v-if="item.reply_content">
                        <view>
                            <text class='allEvaluae_fd1_1_c3_c0_c0'>商家回复：</text>
                            <text class='flex-sub allEvaluae_fd1_1_c3_c0_c0'>{{item.reply_content}}</text>
                        </view>
                    </view>
                    <view class='flex flex-wrap align-center allEvaluae_fd1_1_c4'>
                    </view>
                </view>
				</template>
				<view v-if="list.list.data.length == 0" class="text-xl text-center text-gray flex flex-direction align-center justify-center"
					style="margin-top: 20%;">
					<image :src='STATIC_URL+"137.png"' mode="widthFix" style="width:400rpx;"></image>
				</view>
				</view>
            </view>

            <!---flex布局flex布局结束-->


        </view>
    </page-body>
</template>
<script>
    export default {
        components: {},


        data() {
            return {
                "fd1_1_c0_c1_c1": 2,
                "evaluateType": [{
                    "name": "全部",
                    "value": "0",
                    "image": ""
                }, {
                    "name": "好评",
                    "value": "1",
                    "image": ""
                }, {
                    "name": "有图",
                    "value": "2",
                    "image": ""
                }, {
                    "name": "差评",
                    "value": "3",
                    "image": ""
                }, {
                    "name": "中评",
                    "value": "4",
                    "image": ""
                }],
                "evaluate_id": "0",
                "aid": "",
				list:'',
				page:1,
				list2:[]
            };
        },
        computed: {

        },
        watch: {},
        onLoad(options) {
            let {
                aid
            } = options
            if (aid !== undefined) this.aid = aid
			this.isShow = true
			this.getjf49d54300ce64Func()
        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {

        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {
			this.page = 1
			this.isShow = true
			this.getjf49d54300ce64Func()
			setTimeout(function () {
				uni.stopPullDownRefresh();
			}, 1000);
        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
			qiehuan(){
				this.page = 1
				this.isShow = true
				this.getjf49d54300ce64Func()
			},
			async getjf49d54300ce64Func() {
			    let datalist = await this.$api.get(global.apiUrls.post649d54300ce64, {
			        aid: this.aid,
					type:this.evaluate_id,
					page:this.page
			    });
			
			    if (datalist.data.code != 1) {
			        this.$message.info(datalist.data.msg);
			        return
			    }
			    let infolist = datalist.data;
				this.list = infolist.data
				
				if(this.page == 1){
					this.list2 = []
				}
				this.list2 = this.list2.concat(infolist.data.list.data)
				if(this.list2.length < infolist.data.list.total){
					this.upType = true
				}else{
					this.upType = false
				}
				// console.log(this.list1,)
				this.isShow = false
			    
			}
        }
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: #fff;
        background-size: 100% auto;
    }

    .allEvaluae_flex_0 {
		background: #fff;
        width: 750rpx;
        height: 88rpx;
        overflow: hidden;
        z-index: 5;
        top: 0rpx;
    }

    .allEvaluae_fd0_0_c1 {
        color: #333333;
        font-size: 36rpx;
        font-weight: 500;
        line-height: 50rpx;
    }

    .allEvaluae_fd0_0_c0_c0 {
        font-size: 32rpx;
        font-weight: 500;
        color: var(--benbenFontColor0);
    }

    .allEvaluae_fd0_0_c0 {
        width: 180rpx;
        height: 88rpx;
    }

    .allEvaluae_fd0_0 {
        padding: 0rpx 32rpx 0rpx 32rpx;
        height: 88rpx;
    }

    .allEvaluae_flex_1 {
        padding: 32rpx 0rpx 0rpx 0rpx;
    }

    .allEvaluae_fd1_1_c4 {
        background: rgba(238, 238, 238, 1);
        width: 686rpx;
        background-size: 100% auto;
        margin: 8rpx 32rpx 0rpx 32rpx;
        height: 1rpx;
    }

    .allEvaluae_fd1_1_c3_c0_c0 {
        color: #666666;
        font-size: 24rpx;
        font-weight: 500;
        line-height: 33rpx;
    }

    .allEvaluae_fd1_1_c3 {
        background: rgba(246, 247, 249, 1);
        margin: 0rpx 32rpx 24rpx 32rpx;
        background-size: 100% auto;
        border-radius: 8rpx;
        padding: 24rpx 24rpx 24rpx 24rpx;
    }

    .allEvaluae_fd1_1_c2_c0_c0 {
        width: 226rpx;
        height: 226rpx;
        border-radius: 8rpx;
    }

    .allEvaluae_fd1_1_c2_c0 {
        margin: 0rpx 2rpx 24rpx 2rpx;
    }

    .allEvaluae_fd1_1_c2 {
        padding: 0rpx 30rpx 0rpx 30rpx;
    }

    .allEvaluae_fd1_1_c1 {
        margin: 0rpx 32rpx 24rpx 32rpx;
        color: #333333;
        font-size: 28rpx;
        font-weight: 500;
        line-height: 40rpx;
    }

    .allEvaluae_star1fd1_1_c0_c1_c1 {
        height: 18rpx;
        margin: 0rpx 4rpx 0rpx 0rpx;
        width: 18rpx;
    }

    .allEvaluae_star1fd1_1_c0_c1_c1 {
        width: 18rpx;
        height: 18rpx;
        margin: 0rpx 4rpx 0rpx 0rpx;
    }

    .allEvaluae_fd1_1_c0_c1_c0_c1 {
        color: #999999;
        font-size: 24rpx;
        font-weight: 400;
        line-height: 33rpx;
    }

    .allEvaluae_fd1_1_c0_c1_c0_c0 {
        -webkit-line-clamp: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        margin: 0rpx 20rpx 0rpx 0rpx;
        color: #333333;
        font-size: 28rpx;
        font-weight: 400;
        line-height: 40rpx;
    }

    .allEvaluae_fd1_1_c0_c1_c0 {
        margin: 0rpx 0rpx 8rpx 0rpx;
    }

    .allEvaluae_fd1_1_c0_c0 {
        width: 56rpx;
        height: 56rpx;
        border-radius: 28rpx;
        margin: 0rpx 16rpx 0rpx 0rpx;
    }

    .allEvaluae_fd1_1_c0 {
        margin: 0rpx 32rpx 24rpx 32rpx;
    }

    .allEvaluae_fd1_1 {
        margin: 0rpx 0rpx 32rpx 0rpx;
    }

    .allEvaluae_fd1_0_c1_c0 {
        color: var(--benbenFontColor0);
        font-size: 28rpx;
        font-weight: 400;
        line-height: 40rpx;
    }

    .allEvaluae_fd1_0_c1 {
        background: rgba(246, 247, 249, 1);
        margin: 0rpx 10rpx 24rpx 10rpx;
        background-size: 100% auto;
        border-radius: 28rpx;
        padding: 0rpx 24rpx 0rpx 24rpx;
        height: 56rpx;
    }

    .allEvaluae_fd1_0_c0_c0 {
        color: #FF8E21;
        font-size: 28rpx;
        font-weight: 400;
        line-height: 40rpx;
    }

    .allEvaluae_fd1_0_c0 {
        border: 1px solid var(--benbenbdColor2);
        background: rgba(255, 240, 240, 1);
        margin: 0rpx 10rpx 24rpx 10rpx;
        padding: 0rpx 24rpx 0rpx 24rpx;
        background-size: 100% auto;
        border-radius: 28rpx;
        height: 56rpx;
    }

    ::v-deep .allEvaluae_fd1_0 {
        padding: 0rpx 22rpx 8rpx 22rpx;
    }
</style>